<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
<script src="https://cdn.bootcss.com/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">

</head>
<body role="document" class="theme-default page-signin">

<div class="panel-heading">
    <h1 class="panel-title">奖项设置</h1>
</div>
<div class="panel-body">
    <button id="bttest">testpython</button>
    <div class="input-group">
      <span class="input-group-addon" id="basic-addon1">命令</span>
      <input id="input" type="text" class="form-control" placeholder="pwd" aria-describedby="basic-addon1">
    </div>
</div>
<pre id="out">
</pre>
</body>
<script type="application/javascript">

    var settingInfo = [];

    function sendCommond() {
        var commondobj = {commond:$('#input').val()}
        $.ajax({
            url: '/execCommond',
            method: 'POST',
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            data: JSON.stringify(commondobj)
        }).done(function (response) {
            console.log(response.data);
            $('#out').text(response.data);
        });
    }


    $("#input").keydown(function(event) {
        if (event.keyCode == 13) {
            sendCommond()
        }
    })





</script>


</html>